package com.ykht.proj.coupon.Enum;

/**
 * @Author: lazyBoy
 * @Date: 2021/2/4 15:19
 */
public enum CmsTypeEnum {
//	1草稿  2草稿（定时发布） 3已发布  4已提交 5已审核  6审核失败 7下架 8已推送'
	CMS_TYPE_1(1,"草稿"),
	CMS_TYPE_2(2,"定时发布"),
	CMS_TYPE_3(3,"已发布"),
	CMS_TYPE_4(4,"待审核"),
	CMS_TYPE_5(5,"待发布"),
	CMS_TYPE_6(6,"审核失败"),
	CMS_TYPE_7(7,"下架");
//	CMS_TYPE_8(8,"已推送");
	/**
	 * 数值
	 */
	private Integer value;
	/**
	 * 描述
	 */
	private String desc;

	private CmsTypeEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		CmsTypeEnum[] values = CmsTypeEnum.values();
		for (CmsTypeEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
